import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { fileURLToPath, URL } from 'node:url';


// https://vite.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    cors: true,
    host: '0.0.0.0',
    port: '5176',
    strictPort: true,
    proxy: {
      '/zxkb/api': {
        target: 'http://192.168.0.54:18080',
        changeOrigin: true
      }
    }
  },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})
